import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    name: 'Layout',
    component: ()=>import('../views/Layout'),
    meta:{alive:false},
    redirect:'/index',
    children:[
      {
        path:'/index',
        name:'Index',
        meta:{alive:false},
        component:()=>import('@/views/index/Index')
      },
      {
        path:'/account/all',
        name:'account_all',
        meta:{bread:["账户管理","所有人员"],alive:false},
        component:()=>import('@/views/account/All')
      },
      {
        path:'/product/all',
        name:'product_all',
        meta:{bread:["产品管理","全部产品"],alive:true},
        component:()=>import('@/views/product/All')
      },
      {
        path:'/product/detail',
        name:'product_detail',
        meta:{bread:["产品管理","全部产品","产品详情"],alive:false},
        component:()=>import('@/views/product/Detail')
      },
      
      
    ]
  },
  {
    path:"/login",
    name: 'Login',
    component:()=>import('@/views/Login')
  },
  {
    path:"*",
    name:"404",
    component:()=>import('@/views/404.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
